<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var foot = prompt('请输入您想查询的水果：')
        switch (foot) {
            case '葡萄':
                alert('10元一斤')
                break
            case '榴莲':
                alert('30元一斤')
                break
            case '苹果':
                alert('9元一斤')
                break
            case '香蕉':
                alert('7元一斤')
                break
            default:
                alert('没有查询到')
        }
    </script>
</body>

</html>